home *** CD-ROM | disk | FTP | other *** search
- Path: news1.is.net!news
- From: mvantassel@teambca.com (Mark VanTassel)
- Newsgroups: comp.lang.rexx
- Subject: Re: file I/O
- Date: Tue, 16 Apr 1996 15:31:15 GMT
- Organization: Barfield, Cauthen and Associates
- Distribution: inet
- Message-ID: <4l03ve$mig@news1.is.net>
- References: <tPbVxgabrokE090yn@blvl.igs.net> <316b52d9.4531377@199.60.229.3> <4kgk9b$f36@vixen.cso.uiuc.edu> <3170a5cd.72870236@199.60.229.3>
- NNTP-Posting-Host: dynamic3.is.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- oreo@mindlink.bc.ca (Greg Goss) wrote:
-
- >Someone in mail pointed out the lines() function.
-
- >say lines(fnftfm)
-
-
- >I tried it and it works. Mainframe shops tend to buy one subscription
- >to manuals, and everyone in the building must make do with 14 year old
- >books. My Rexx book is the 1982 version long before LINES() existed.
- >Multisystem rexx authors are trying to get away from execio dependance
- >and you don't need it for this question.
-
- Beware - lines() doesn't always return the number of lines - sometimes
- (in stream-file environments like PCs) it simply returns 1 (meaning "1
- or more remaining") or 0 (meaning "EOF").
-
- If you mean "multisystem" in the sense of VM & MVS, you're probably OK
- with lines()... if you mean it in the more general sense, lines()
- won't help you.
-
- In fact, it worth pointing out (since this seems to come up a lot)
- that in a stream-based system (like PCs, and UNIX (I think!)), there
- is ***NO WAY*** to determine the number of "lines" in a file without
- counting them. Maybe the utility does it for you, maybe you do it
- yourself, but MAKE NO MISTAKE about what's actually going on. If its a
- big file, you wait a long time to find out how many "lines" there are.
- (I put "lines" in quotes because, in stream-based systems, the OS/File
- System has NO concept of a "line" - it's purely a human way of saying
- "how many newline characters exist in this long bytestream")
-
-
-
- - /\/\ark \/anTassel (mvantassel@teambca.com)
-
-